$(document).ready(function()
{
    var options = {
        target: '#result',   // target element(s) to be updated with server response 
       // beforeSubmit: showRequest,  // pre-submit callback 
        success: showResponse,  // post-submit callback 
        url: "/smartforms/receive.aspx",
        type: "post",
        resetForm: true,
        timeout: 3000 
         //type:      type        // 'get' or 'post', override for form's 'method' attribute 
        //dataType:  null        // 'xml', 'script', or 'json' (expected server response type) 
        //clearForm: true        // clear all form fields after successful submit 
        //resetForm: true        // reset the form after successful submit 

        
    };

    // bind form using 'ajaxForm'
    $('#myForm').ajaxForm(options);
});

// pre-submit callback 
function showRequest(formData, jqForm, options)
{
     var queryString = $.param(formData);

     alert('About to submit: \n\n' + queryString);

     return true;
}

// post-submit callback 
function showResponse(responseText, statusText)
{
     alert(responseText);
  } 

 